#include "stdio.h"
#include <malloc.h>

int sizeNumber(int num)
{
	int count = 0;
	while (num != 0)
	{
		num = num / 10;
		count++;
	}
	return count;
}
/*test comment*/
int setDigitNumber(int num)
{
	int size = sizeNumber(num);
	int* digits = (int*)malloc(size * sizeof(int));
	int index = 0;
	while (num != 0)
	{
		digits[index] = num % 10;
		num /= 10;
		index++/*--*/;
	}
	return digits;
}
// Main
/* double
comment
*/
int main(int argc, const char* argv[])
{
	int size = sizeNumber(36);
	int *digitsNumber = setDigitNumber(36);
	int sum7Digit7 = 0;
	for (int i = 0; i < size; i++)
	{
		if(i<100 && i >0)
			printf("array[%d] = %d \n", i, digitsNumber[i]);
		sum7Digit7 += digitsNumber[i];
	}
	printf("Summa digit: %d", sum7Digit7);
	free(digitsNumber);
	return 0;
}